﻿<%@ Page Language="C#" MasterPageFile="~/Management/ManagementMasterPage.master" AutoEventWireup="true" CodeBehind="FocusProduct.aspx.cs" Inherits="WebApp.Management.Product.FocusProduct" Title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphContent" runat="server">

    <asp:ListView ID="lvProdust" runat="server" 
        OnItemCommand="lvProdust_ItemCommand" onitemcanceling="lvProdust_ItemCanceling" 
        onitemediting="lvProdust_ItemEditing" onitemupdating="lvProdust_ItemUpdating" 
        style="margin-top: 0px">
        <LayoutTemplate>
            <table cellpadding="2" border="1">
                <tr>
                    <th>
                    </th>
                    <th>
                        商品名
                    </th>
                    <th>
                        序号
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                <tr id="itemPlaceholder" runat="server" />
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <asp:Image ID="Image1" ImageUrl='<%# Eval("PicUrl") %>' runat="server" Height="96"
                        Width="96" />
                </td>
                <td>
                    <%# Eval("Name") %>
                </td>
                <td>
                    <%# Eval("Sequence")%>
                </td>
                <td>
                    <%--<a href='ProductEditor.aspx?PID=<%# Eval("ProductId") %>'>Edit</a>--%>
                    <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Edit">编辑序号</asp:LinkButton>
                    <asp:LinkButton ID="btnDelete" runat="server" CommandName="OnDelete" CommandArgument='<%# Eval("Id") %>'>取消</asp:LinkButton>
                    <cc1:ConfirmButtonExtender ID="btnDelete_ConfirmButtonExtender" runat="server" ConfirmText="取消推荐该产品的？"
                        Enabled="True" TargetControlID="btnDelete" />
                </td>
            </tr>
        </ItemTemplate>
        <EditItemTemplate>
            <tr>
                <td>
                    <asp:HiddenField ID="HiddenField1" runat="server"  Value='<%#Eval("Id")%>'/>
                    <asp:Image ID="Image1" ImageUrl='<%# Eval("PicUrl") %>' runat="server" Height="96"
                        Width="96" />
                </td>
                
                <td>
                    <%#Eval("Name") %>
                </td>
                <td>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%#Eval("Sequence") %>'></asp:TextBox>
                </td>
                <td>
                    <%--<a href='ProductEditor.aspx?PID=<%# Eval("ProductId") %>'>Edit</a>--%>
                    <%--<asp:LinkButton ID="btnDelete" runat="server" CommandName="OnDelete" CommandArgument='<%# Eval("ProductId") %>'>取消</asp:LinkButton>--%>
                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update">确定</asp:LinkButton>
                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Cancel">取消</asp:LinkButton>
                </td>
            </tr>
        </EditItemTemplate>
    </asp:ListView>
</asp:Content>
